<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">公告管理</h4>
    <button ui-sref="app.notice" class="btn-back btn btn-dark btn-sm btn-rounded">
        返回
    </button>
</div>
<div class="wrapper-md">
    <div class="panel panel-default" ng-controller="editNoticeCtrl">
        <div class="panel-heading m-n">
            编辑公告信息
        </div>
        <div class="panel-body">
            <form name="noticeForm" class="form-horizontal" ng-submit="editNotice()">
                <div class="form-group">
                    <label class="col-sm-2 control-label">公告标题</label>
                    <div class="col-sm-5">
                        <input name="name" ng-model="notice.name" type="text" placeholder="标题" class="form-control" required>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="noticeForm.name.$touched">
                        <span class="text text-danger" ng-if="noticeForm.name.$error.required">公告名称是必填的</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">公告内容</label>
                    <div class="col-sm-5">
                        <textarea name="content" ng-model="notice.content" class="form-control" rows="4" placeholder="请输入您要发布的公告" required></textarea>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="noticeForm.content.$touched">
                        <span class="text text-danger" ng-if="noticeForm.content.$error.required">公告内容是必填的</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">有效日期</label>
                    <div class="col-sm-5" ng-controller="DatepickerDemoCtrl">
                        <div class="input-group w-lg">
                            <input type="text" class="form-control" readonly="readonly" name="endTime" ng-model="notice.endTime" placeholder="请输入日期" alt-input-formats="altInputFormats" uib-datepicker-popup="yyyy-MM-dd" datepicker-popup="yyyy/MM/dd"
                                   alt-input-formats="altInputFormats" is-open="opened" min-date="minDate" datepicker-options="dateOptions" ng-required="true" close-text="关闭" clear-text="清空" current-text="今天" required/>
                            <span class="input-group-btn">
                                <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                            </span>
                        </div>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="noticeForm.endTime.$touched">
                        <span class="text text-danger" ng-if="noticeForm.endTime.$error.required">公告有效日期必填</span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="submit" class="btn btn-success" ng-disabled="noticeForm.$invalid">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>